home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
boot
/
czesc_2
/
patchos
/
patch2.0.doc
< prev
next >
Wrap
Text File
|
1992-08-04
|
18KB
|
381 lines
PPPPPPP AAAAAA TTTTTTTT CCCCCC HH HH 222222 000000
PP PP AA AA TT CC CC HH HH 22 22 00 00
PP PP AA AA TT CC HH HH 22 00 00
PP PP AA AA TT CC HH HH 22 00 00
PPPPPPP AAAAAAAA TT CC HHHHHHHH 22 00 00
PP AA AA TT CC HH HH 22 00 00
PP AA AA TT CC HH HH 22 ... 00 00
PP AA AA TT CC CC HH HH 22 ... 00 00
PP AA AA TT CCCCCC HH HH 22222222 ... 000000
© June 1992 by
Bernstein Zirkel Softworks
c/o Hartmut Stein
Koelner Str. 7
W-5090 Leverkusen 3 - Opladen
West-Germany
1. A short introduction
-----------------------
Whow! There it is, your brand new A(500+|600|3000|whatever with
OS 2.xx) and it's just looking great! A nice looking 3-dimensional
graphics design, a sharp dressed Workbench and hundreds of
fascinating new functions in the OS.
But after some hours of work (editing, compiling etc., not just
clicking icons on the Workbench) I discovered that there were a few
things missing on my A3000. Since I couldn't find a solution for my
problems in the usual mouse- and Intuition-programs (like MachIV -
which I use currently - or all the others), I decided to write
Patch2.0. The program enhances OS 2.04 or higher with three new
features.
2. Menu-shortcuts
-----------------
The first new (or old?) feature are keyboard-shortcuts for
menu-items. You may think now 'What is he going to tell me? I just
CAN use menu-shortcuts with the right amiga key!' That's right, but
did you ever try this with an active string-gadget? Under OS 1.3 it
works well: you just hit right amiga together with the proper key
and Intuition sends this to your program as a menu-selection. Under
OS 2.0 this IS a problem, since Intuition totally ignores the
menu-shortcuts, when a string-gadget is active, and just inserts the
key into the gadget. This seems to be a really strange idea witch
makes no sense at all and makes you grab your mouse permanently. As
an example let's have a look at the editor CygnusEd (which I use
currently and like very much):
If you want to search a string, CygnusED opens up a new window
with some toggle buttons ('upper case == lower case', 'wild cards',
etc.) and a string-gadget, which is automatically activated. So you
can type in the search string without having to activate the gadget
manually. The window also has a menu attached ('leave search',
'toggle upper case == lower case', 'toggle wild cards', ...), of
which the items can also be accessed via shortcuts ('l' for leave,
'c' for toogle case, 'w' for wild cards, ...). So there are three
different ways to change for example the case sensitivity of the
text search:
a) grab your mouse and click the gadget
b) grab your mouse and choose the menu-item
c) grab your keyboard and press right-amiga-c
Under OS 1.3 I absolutely prefered the third method, since I
needn't remove my fingers from the keyboard. But what's happening
under OS 2.0? When I press this combination while the string-gadget
is active, Intuition just inserts a 'c' into the string! Hahaha,
that's a really funny idea commodore had...
This problem does not only belong to CygnusED, it appears in
every program which offers string-gadgets and menu-shortcuts
together in the same window.
When Patch2.0 is installed, the program checks all input from the
keyboard. If it finds a key pressed in combination with the right
amiga key, it takes a look at the actual window. When it finds an
active string gadget and a menu bar, which contains an item with the
pressed key as a shortcut, it sends a menu-selection-message to the
appropriate program, thus bypassing Intuition's strange way of
handling menu-shortcuts!
3. Use the '*' in pattern matching
----------------------------------
Under OS 1.3 I used the APR Shell commands, which allowed me to
use the '*' instead of the '#?'. The OS 2.0 pattern matching
functions of the dos.library also can understand the '*', but it's
needless to say that this nice little feature is disabled by default
and that there is no possibility to enable it in one of the
different preferences editors.
Patch2.0 gives you full control over this pattern matching
facility.
Since the '*' normally stands for the actual shell window, it is
not 100% compatible to the '#?' pattern. For example 'Copy * RAM:X'
won't copy all files from the actual directory to the directory
'RAM:X', it just copies all lines of text you now enter into a file
named 'RAM:X'. This problem only appears when you use a single star
as a pathname. That means that you can type 'Copy Work:Data/*
RAM:X' or 'Copy *.c RAM:X'. A very easy solution for this problem
is to use the '**' pattern which means exactly the same and is
accepted as a normal pattern.
4. Insert Chars by typing their ASCII-code
------------------------------------------
On MS-DOS-PCs I found one feature I missed on the Amiga -
insertion of any character by entering its ascii-equivalent on the
numeric pad in combination with the control key (that's the only
feature of PCs I miss on the Amiga ... by the way: Do you know how
to create a large program on any computer with an INTEL processor
inside - like 'Windows' on MS-DOS-PCs? Well, that's very easy.
Just take some apes - a million or two, or a bit more - and place
them together in a large, large room. Then give every ape a PC
(there are people who say that just every real ape on earth owns a
PC, but I can't agree with this). After that, close the door of the
large, large room and wait a bit - let's say, one eternity or two.
Then visit the room again and there it is - 'Windows' for PCs! Now
you know what 'INTEL' is the abbreviation for: 'INfinite Terror of
apE Legions'. Now can you imagine what 'IBM' could mean?).
Patch2.0 checks the input stream for any keys on the numeric pad
pressed together with the control key. If it finds some of those,
it converts them to the appropriate ASCII-character. This is very
useful when inserting some special characters (which are difficult
to find on the keyboard, like '©' or 'ª') into a text or when
searching for some special ASCII-values like for example 155, which
is known as the 'Control Sequence Introduce' of the console.device.
As mentioned above, CygnusED (and all other editors I know) use
string-gadgets for entering a search-string. Since you can't enter
a ACII-code like 155 on the keyboard, you can't search for it. When
Patch2.0 is active, this is not longer a problem (be sure to switch
the 'Text gadget filter' in the IControl-preferences-editor off).
Just activate the search option, press the control key and type
'155' on the numeric pad - that's it!
5. Installation
---------------
Patch2.0 consists of two parts: the program 'Patch2.0' itself,
which can be placed anywhere, and the handler 'Patch2.0Handler',
which must be placed in the 'L:'-directory.
Workbench-Users should click the 'InstallHandler'-Icon, which
copies the Handler to the desired directory. Then you should move
'Patch2.0' to the 'WBStartup'-directory of your 'WB_2.x'-disk. In
this case the program will be started automatically every time you
start or reboot the amiga. To stop the program (if it should ever
be necessary) just double click on it.
Shell-Users can use the InstallHandler-Skript to copy the Handler
to the 'L:'-directory (or just the 'Copy'-command...). Then copy
'Patch2.0' to your 'C:'-directory and insert a line in your
startup-sequence, which will start Patch2.0 automatically on every
start or reboot of the amiga. You don't need 'Run' or 'RunBack',
since it just installs the handler in the background and then
returns to the Shell. To stop the program just start it again.
6. Options
----------
There are lots of options which control the behaviour of
Patch2.0. In the normal case you don't need any of those, so
Patch2.0 will work completely as stated above.
The options are valid for both Workbench- and Shell-users.
Workbench-users can enter the options as tooltypes (have a look at
your Workbench-manual for more information about tooltypes),
Shell-users enter the options as usual after the command's name.
Upper and lower case are ignored. When started from the Shell with
a '?' as the only argument, you will get a help string in the usual
format for Shell commands (look at the Shell manual for more
information).
On
Install Patch2.0
Off
Remove Patch2.0. If neither 'On' nor 'Off' are given, the actual
state of the program is inverted (that means: if it was off,
switch it on, otherwise switch it off).
Quiet
Normally Patch2.0 shows you a requester saying 'Patch2.0
installed' on startup. This option diables the requester.
Usage
Show a requester with short explanations for the different
options (better have a look at this file!).
MenuOff
Disable the interception of menu-shortcuts; you get the same
silly behaviour as without Patch2.0!
AsciiOff
Disable the ASCII-input via the numeric pad (to remove this
PC-feeling from your Amiga).
PatternOff
The '*' as replacement for the '#?'-pattern is enabled by setting
a specified flag in one of the dos.library's data structures
(sorry, but there is no function for this in the library).
Normally Patch2.0 sets this flag, if you enable the '*', and
clears it, if you disable it. So if another program wants to
manipulate the flag, it will be overwritten by Patch2.0. If this
turns out to be a problem, you should specify this option.
Patch2.0 will then never touch this flag.
StarOff
Disable the '*' in pattern matching.
Qualifier=nnn
'nnn' is a decimal number which describes the qualifier
(qualifiers are: control, caps lock, shift, alt, amiga) for
ASCII-input via the numeric pad (defaults to the control key).
The qualifiers have the following values:
Left Shift 1
Right Shift 2
Caps Lock 4
Control 8
Left Alt 16
Right Alt 32
Left Amiga 64
Right Amiga 128
If you want a combination of qualifiers you simply add the
values.
Cx_Priority=nnn
The decimal number 'nnn' specifies the priority of Patch2.0's
inputhandler.
Cx_PopUp=yes|no
Please enter either 'yes' or 'no' for this option. In the first
case Patch2.0 will automatically open its commodity window, where
you can adjust all the settings by the use of gadgets.
7. Some examples
----------------
This are some examples for how to start Patch2.0 from the shell. To
use the examples from the workbench just enter every option as a
single tool type in Patch2.0's info-window.
Patch2.0 On PatternOff
Start Patch2.0 (or give an error message if it's just running).
The pattern matching flag of dos.library will not be affected at
all.
Patch2.0 Off
Stop Patch2.0 (or give an error message if it wasn't running
yet).
Patch2.0 Qualifier=17 CX_Priority=100
Use the combination of the left shift and the left alt key to
insert ASCII chars via the numeric pad. The inputhandler is
inserted at a priority of 100.
Patch2.0 On CX_PopUp=Yes
Start Patch2.0 (if it wasn't running yet) and open up the control
window.
8. Commodities
--------------
Patch2.0 can be controlled via the Commodities Exchange tool you
find on your Workbench disk. It may be freely enabled, disabled or
killed. When you use the 'Show'-Button (or the 'Cx_PopUp=yes'
option an startup) Patch2.0 opens a special window where you can
control all the programs features.
At the top of the window you find four gadgets which correspond
to the four '...Off'-options explained above. Use these gadgets to
toggle the features of Patch2.0 on or off. If a gadget is checked,
the feature is turned on.
In the field below the features you can adjust the qualifiers for
ASCII-input by hilighting the desired buttons.
At the bottom of the window you find three gadgets: 'Hide'
closes the window, keeping Patch2.0 still in memory, while 'Quit'
closes the window and removes the program. The third button 'Save
to Icon' is only available when the program was started from
Workbench. In this case you can save the actual settings as
tooltypes to Patch2.0's icon, so they will by active on the next
start of the program. There's no service like this for Shell-users;
you have to type it to the command line by yourself (I think
Shell-users like typing, so this should be no problem for you...).
9. Caveats
----------
Though I used this program for a couple of weeks without
problems, there may be any number of lurking bugs in it. So if it
low-level-formats your harddisk, makes your monitor explode into
lots of little pieces, gobbles down your cat or drinks all the
liquid from your neighbour's aquarium, making his goldfish gasping
for water - please don't blame it on me!
7236 bytes of disk space seem to be a bit more then needed for
such a program like Patch2.0. More than 50 % of this (57% or 4140
byte) are used to manage the commodity window. If you don't need
this and want to use the smaller version you can order it from me
(see below).
Following this comes some legal stuff which sounds very well to
me. I took it from the readme file for Arq, which is a very, very,
very good and useful program. Hi, Martin, if you would have
mentioned your adress in this file, I would have sent you something
for your work. But, maybe, you will find Patch2.0 a bit useful,
too...
10. Legal Stuff
---------------
The author will not be liable for any damage arising from the
failure of this program to perform as described, or any destruction
of other programs or data residing on a system attempting to run the
program. While the author knows of no damaging errors, the user of
this program uses it at his or her own risk.
11. Other Stuff
---------------
This code and documentation are freely distributable and may be
used, copied, modified, fed to your dog or whatever you like to do
with it. It would be nice not to remove this text when copying the
program, so other people will also be able to understand its
meaning.
If you have any questions, have ideas for special improvements,
want to have a look at the sources of the program (rather
undocumented, I'm afraid), want to order the smaller version or if
you just want to thank me for this wonderful little tool, you should
send me some money (or other valuables), a self-adressed and stamped
envelope (if you want response) and a empty disk (if you want the
sources).
Patch2.0 was programmed using the Aztec C 5.2a compiler, but it
should be compilable with any of the Aztec compilers.
12. An Apology
--------------
I'm afraid I have to apologize for the sometimes extremly poor
quality of this writing. When I left school, my English was very
bad. Since then I improved it a little bit by reading, re-reading
and re-re-reading the english Rom Kernel Reference Manuals for a
long time and also placing them under my pillow to absorb them by
osmosis (this joke © by Randell Jesup). I also tried this with my
AmigaDOS manuals, but that gave me extremly horrible nightmares of
terrible red monsters, at least ten foot tall, stalking me from the
back while I was sitting at my computer trying to program something
useful in combination with the dos, with the four green flashing
letters of 'BCPL' on their chests and trying to beat me with their
enormous global vectors. I woke up crying and all my sheets soken
wet and I never tried this again...